import {UserInfoType} from "@src/services/userinfo.ts";

export const getUserInfo = (): UserInfoType => {
    const data: string | null = localStorage.getItem("UserData");
    if (data) {
        return JSON.parse(data)
    } else {
        return {
            user: {
                "name": "",
                "email": "",
                "gender": null,
                "birthdate": "",
                "avatar": "",
                "isVisitor": true
            }
        }
    }
}